import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
const routes = [
    {
        path: '/',
        component:()=>import('../view/lilei.vue'),
        redirect:'/parent'
    },{
        path:'/login',
        component:()=>import('../view/Loginafter.vue'),
    },{
        path:'/parent',
        component:()=>import('../view/Parent.vue')
    }
]
const router = new VueRouter({
    routes
});
// router.beforeEach((to,from,next)=>{
//         if(to.path!='/'&&!Vue.prototype.Token){
//             console.log('请先登录');
//             next('/');
//             return
//         }
//         next()
//         console.log(to.path)
//         console.log(from);
//         console.log(next) 
//     })
export default router;